package com.ziyueyuwen.xiniao.enums;

/**
 * @author jun 2018/11/20
 */
public enum HttpStatusEnum {
    /**
     * 请求成功!
     */
    OK(200, "请求成功!"),

    /**
     * 需登录的请求!
     */
    UNAUTHORIZED(401, "需登录的请求!"),

    /**
     * 您的账号已在异地登录!
     */
    REPEAT_LOGIN(401, "您的账号已在异地登录!"),

    /**
     * 无权限访问!
     */
    FORBIDDEN(403, "无权限访问!"),

    /**
     * 网页丢失了!
     */
    NOT_FOUND(404, "网页丢失了!"),

    /**
     * 服务器内部错误!
     */
    SERVER_ERROR(500, "服务器内部错误!");

    private final Integer code;
    private final String des;

    HttpStatusEnum(Integer code, String des) {
        this.code = code;
        this.des = des;
    }

    public Integer getCode() {
        return code;
    }

    public String getDes() {
        return des;
    }

}
